<template>
    <div style="line-height: 50px">
        <el-container>
            <el-header>
                   <el-steps :active="active" finish-status="success">
                        <el-step title="验证手机"></el-step>
                        <el-step title="更改密码"></el-step>
                        <el-step title="更改完成"></el-step>
                    </el-steps>
            </el-header>
            <el-main>
                <router-view/>
              <el-button style="margin-top: 12px;" @click="next">下一步</el-button>
            </el-main>
        </el-container>

        <div>
            
        </div>
    </div>
</template>
<script>
export default {
    name:"changePassword",
    data() {
      return {
        input: '',
        active: 0
      };
    },

    methods: {
      next() {
          if (this.active++ > 2) this.active = 0;
                 console.log("进入了"+sessionStorage.getItem("next"))
                if(sessionStorage.getItem("next")=="1"){
                    console.log("进入了"+sessionStorage.getItem("next"))
                    sessionStorage.setItem("next","2")
                    this.$router.push({name:"userUpdatePassword"})
                }else{
                    
                    console.log("进入了"+sessionStorage.getItem("next"))
                    this.active = 0;
                    this.$router.push({name:"afterOkPassword"})
                }
       
      }
    }
}
</script>